package com.hq.zb.mapper;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.hq.zb.model.RoleMenu;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 角色菜单关系表 Mapper 接口
 * </p>
 *
 * @author huanghanrui
 * @since 2022-03-09
 */
@Mapper
public interface RoleMenuMapper extends BaseMapper<RoleMenu> {

    /**
     * 删除已分配的角色菜单
     * @param roleId
     */
    void deleteRoleMenu(@Param("roleId") Integer roleId);

    /**
     * 查询用户角色菜单
     * @param userId
     * @return
     */
    List<Integer> queryMenuIdByRoleUser(@Param("userId") Integer userId);
}
